<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>商品一级分类列表</title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="/Public/admin/assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="/Public/admin/assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <script src="/Public/admin/assets/js/echarts.min.js"></script>
    <link rel="stylesheet" href="/Public/admin/assets/css/amazeui.min.css" />
    <link rel="stylesheet" href="/Public/admin/assets/css/amazeui.datatables.min.css" />
    <link rel="stylesheet" href="/Public/admin/assets/css/app.css">
    <script src="/Public/admin/assets/js/jquery.min.js"></script>

</head>

<body data-type="widgets">
    <script src="/Public/admin/assets/js/theme.js"></script>
    <div class="am-g tpl-g">
        <include file="./Application/Admin/View/Share/header.html"/>
        <include file="./Application/Admin/View/Share/left.html"/>

        <!-- 内容区域 -->
        <div class="tpl-content-wrapper">

            <div class="container-fluid am-cf">
                <div class="row">
                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-9">
                        <div class="page-header-heading"><span class="am-icon-home page-header-heading-icon"></span> 商品分类管理 <small>商品一级分类列表</small></div>
                        <p class="page-header-description">你可以查看、编辑及删除商品的分类</p>
                    </div>
                    <div class="am-u-lg-3 tpl-index-settings-button">
                        
                    </div>
                </div>

            </div>

            <div class="row-content am-cf">

         <div class="row">
                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                        <div class="widget am-cf">
                            <div class="widget-head am-cf">
                                <div class="widget-title  am-cf">商品一级分类列表</div>


                            </div>
                            <div class="widget-body  am-fr">

                                <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                                    <div class="am-form-group">
                                        <div class="am-btn-toolbar">
                                            <div class="am-btn-group am-btn-group-xs">
                                                <button type="button" class="am-btn am-btn-default am-btn-success" onclick="newsort()"><span class="am-icon-plus"></span> 新增分类</button>
                                                <button type="button" class="am-btn am-btn-default am-btn-secondary"><span class="am-icon-save"></span> 保存</button>
                                                <button type="button" class="am-btn am-btn-default am-btn-warning"><span class="am-icon-archive"></span> 审核</button>
                                                <button type="button" class="am-btn am-btn-default am-btn-danger"><span class="am-icon-trash-o"></span> 删除</button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                              
                           

                                <div class="am-u-sm-12">
                                    <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black ">
                                        <thead>
                                            <tr>
                                                <th>商品一级分类id</th>
                                                <th>商品一级分类名称</th>
                                                <th>商品一级分类图标</th>
                                                <th>最后修改时间</th>
                                                <th>操作</th>
                                            </tr>
                                        </thead>
                                        <tbody id="sort-list-box">
                                            
                                         
                                    
                                        </tbody>
                                    </table>
                                </div>
                                <div class="am-u-lg-12 am-cf">

                                    <div class="am-fr">
                                        <ul class="am-pagination tpl-pagination">
                                            <li class="am-disabled"><a href="#">«</a></li>
                                            <li class="am-active"><a href="#">1</a></li>
                                            <li><a href="#">2</a></li>
                                            <li><a href="#">3</a></li>
                                            <li><a href="#">4</a></li>
                                            <li><a href="#">5</a></li>
                                            <li><a href="#">»</a></li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

             


                

            </div>
        </div>
    </div>
    </div>
<script type="text/html" id="sort-list-tpl">
             <%for(var i =0 ; i< data.length ; i++){%>
             <tr class="gradeX">
                          <td><%=data[i].id%></td>
                          <td class="am-text-middle"><%=data[i].sortname%></td>
                          <td class="am-text-middle"><img src="<%=data[i].sortimgurl%>" style="background: #fff"/> </td>
                          <td class="am-text-middle"><%=data[i].createdate%></td>
                          <td class="am-text-middle">
                                        <div class="tpl-table-black-operation">
                                            <a href="/Admin/Sort/editSort?sort_id=<%=data[i].id%>">
                                                <i class="am-icon-pencil"></i> 编辑
                                            </a>
                                            <a href="/Admin/TwoSort/manageTwoSort?sort_id=<%=data[i].id%>">
                                                <i class="am-icon-copy"></i> 管理二级分类
                                            </a>
                                            <a href="/Admin/Sort/delSort?sort_id=<%=data[i].id%>" onclick="return delsort();" class="tpl-table-black-operation-del">
                                                <i class="am-icon-trash"></i> 删除
                                            </a>
                                        </div>
                          </td>
             </tr>
             <%}%>
</script>
<script src="/Public/admin/assets/js/amazeui.min.js"></script>
<script src="/Public/admin/assets/js/amazeui.datatables.min.js"></script>
<script src="/Public/admin/assets/js/dataTables.responsive.min.js"></script>
<script src="/Public/admin/assets/js/app.js"></script>
<script src="/Public/js/Share/template.js"></script>
<script src="/Public/js/Admin/sort.js"></script>
<script >
            SORT.run();
             function newsort(){
                        window.location.href='{:U('/Admin/Sort/newSort')}';
             }

             function delsort(){
                          if(confirm("确定要删除此分类吗？")){
                                  return true;
                          }else{
                                 return false;
                          }
             }
</script>
</body>

</html>